package org.vsg.common.ibatis3.support;

import org.mybatis.spring.SqlSessionTemplate;


/**
 * using for template support 
 * @author Bill vison
 *
 */
public interface SqlSessionTemplateSupport {

	public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate);	
	

	
	class Helper {
		public static void interceptTemplate(Object obj , SqlSessionTemplate sqlSessionTemplate) {
			if (obj != null && obj instanceof SqlSessionTemplateSupport) {
				SqlSessionTemplateSupport support = (SqlSessionTemplateSupport)obj;
				support.setSqlSessionTemplate( sqlSessionTemplate );
			}			
		}
	}
}
